package com.heima.model.article.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * APP已发布文章配置表
 */

@Data
@TableName("ap_article_config")
@NoArgsConstructor
public class ApArticleConfig implements Serializable {

    public ApArticleConfig(Long articleId){
        this.articleId = articleId;
        this.isComment = true;
        this.isForward = true;
        this.isDelete = false;
        this.isDown = false;
    }
    @TableId(value = "id",type = IdType.ID_WORKER)
    private Long id;

    //文章id
    @TableField("article_id")
    private Long articleId;

    //是否可评论 true:可以评论    false:不可评论  0
    @TableField("is_comment")
    private Boolean isComment;

    //是否转发 true:可以转发   false:不可转发  0
    @TableField("is_forward")
    private Boolean isForward;

    //是否下架 true:下架   false:没有下架  0
    @TableField("is_down")
    private Boolean isDown;

    //是否已删除  true:删除   false:没有删除  0
    @TableField("is_delete")
    private Boolean isDelete;
}